package com.android.hidephotosplus.adapter;

import java.util.ArrayList;

import com.android.hidephotosplus.R;

import android.content.Context;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

public class ViewPagerAdapter extends FragmentPagerAdapter {

	private String[] listViewPager = null;

	private Context context;

	private ArrayList<Fragment> mArrFragments;

	public ViewPagerAdapter(Context context, FragmentManager fm,
			ArrayList<Fragment> mArrFragments) {
		super(fm);

		this.context = context;
		listViewPager = context.getResources().getStringArray(
				R.array.listViewPager);
		this.mArrFragments = mArrFragments;

	}

	@Override
	public Fragment getItem(int position) {
		return mArrFragments.get(position);
	}

	@Override
	public int getCount() {
		return mArrFragments.size();
	}

	@Override
	public CharSequence getPageTitle(int position) {
		return listViewPager[position];
	}
	
	@Override
	public int getItemPosition(Object object) {
		return POSITION_NONE;
	}

}
